<template>
  <div>
    <ul v-for="(item,index) in disitems" :key="item.id" @click="detail(index)">
      <li>
        <img :src="item.img ? item.img : item.pic" alt />
      </li>
      <li>
        <span>{{ item.title ? item.title : item.name }}</span>
        <span>{{ item.subtitle ? item.subtitle : item.intro}}</span>
        <span>
          <p>{{ item.business ? item.business : item.officialPrice }}</p>
          <p>{{ item.date ? item.date : item.tag_name[0] }}</p>
        </span>
      </li>
    </ul>
  </div>
</template>

<script >
export default {
  data() {
    return {
      
    };
  },
  props:{
        disitems:Array
    },
  methods: {
    detail(index) {
      this.$router.push({ name: "equitems", params: { index } });
    },
  },
};
</script>

<style lang="scss" scoped>
ul {
  display: flex;
  margin-top: 15px;
  li:nth-of-type(1) {
    width: 110px;
    height: 110px;
    margin-right: 10px;
    overflow: hidden;
    img {
      height: 100%;
      width: 100%;
    }
  }
  li:nth-of-type(2) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    span:nth-of-type(1) {
      width: 230px;
      font-size: 15px;
    }
    span:nth-of-type(2) {
      width: 100%;
      font-size: 15px;
      color: #ff4338;

    }
    span:nth-of-type(3) {
      width: 100%;
      align-items: center;
      display: flex;
      justify-content: space-between;
      p {
        font-size: 12px;
        color: #999;
      }
    }
  }
}
</style>